package com.cy.store.service;

import com.cy.store.entity.Address;

import java.util.List;

//收货地址业务层接口
public interface IAddressService {
    void addNewAddress(Integer uid, String username, Address address);

    List<Address> getByUid(Integer uid);

    /**
     * 根据aid查找地址
     * @param aid
     * @return
     */
    Address getByAid(Integer aid,Integer uid);

    /**
     * 将用户的某个地址设为默认地址
     * @param aid
     * @param uid
     * @param username
     */
    void setDefault(Integer aid,Integer uid,String username);

    /**
     * 删除用户选中的收货地址数据
     * @param aid
     * @param uid
     */
    void deleteAddress(Integer aid,Integer uid);
}
